#pragma once

namespace YX
{
	template<class K,class Hash = HashFunc<K>>
	class UnorderedSet
	{
	private:

		struct SetKeyOfType
		{
			const K& operator()(const K& key)
			{
				return key;
			}

		};

		HashTable<K, K, Hash, SetKeyOfType> _hashTable;

	public:

		typedef typename HashTable<K, K, Hash, SetKeyOfType>::iterator iterator;

		pair<iterator, bool> Insert(const K& key)
		{
			return _hashTable.Insert(key);
		}

		iterator begin()
		{
			return _hashTable.begin();
		}

		iterator end()
		{
			return _hashTable.end();
		}

		bool Erase(const K& key)
		{
			return _hashTable.Erase(key);
		}

		iterator Find(const K& key)
		{
			return _hashTable.Find(key);
		}
	};

}